package com.itheima;


import java.util.Scanner;

/*
* * 键盘录入六个 1-10（包含1和10）之间的数字存入数组中
 * 然后计算出去掉最大值与最小值的平均数
 * 输出格式如下
 *
 * 数组中的数据为:
1 2 3 4 5 6
最大值为: 6
最小值为: 1
平均数为: 3.5

 * */
public class Test1 {

    public static void main(String[] args) {



        int[] a = new int[6];
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < 6; i++) {
            int i1 = scanner.nextInt();
            a[i] = i1;
        }

        int max = 0;
        int min = 100;
        double sum = 0;
        for (int i = 0; i < 6; i++) {
            if (max < a[i]) {
                max = a[i];
            }
            if (min > a[i]) {
                min = a[i];
            }
            sum += a[i];
        }
        sum = (sum - max - min)/4;

        System.out.println(max+"\t"+min+"\t"+sum);

    }
}
